<?php

namespace app\common\service;


class FileService
{
    /**
     * 获取文件类型
     * @param $name
     * @return array
     */
    public static function path($name)
    {
        $path = '';
        $replace = false;
        $type = 'image';
        switch ($name) {
            case 'headimg':
                $path = 'headimg';
                break;
            case 'index_banner':
                $path = 'index/banner';
                break;
        }
        return compact('path', 'replace', 'type', 'name');
    }
}